#include"BackgroundImage.h"

BacgroundImage::BacgroundImage(const QString &fileName)
{
    image = QImage(fileName);
}
void BacgroundImage::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
    painter->drawImage(0, 0,image);
}

QRectF BacgroundImage::boundingRect() const
{
    return QRectF(QPointF(0, 0), image.size());
}
QSizeF BacgroundImage::size() const
{
    return image.size();
}
